<%@ page language="java"  pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script>
function deleteSingle(byval)
{
	if(confirm("确认删除么？"))
	{
		document.getElementById(byval).checked=true;
		document.forms[0].action="/OpenAuthWebApplication/action/actDeleteAction!delete.action";
		document.forms[0].submit();
	}
}
function updateSingle(byval)
{
	document.getElementById("actionId").value=byval;
	document.forms[0].action="/OpenAuthWebApplication/action/actInitAction!init.action?oper=update";
	document.forms[0].submit();
}
</script>
<jsp:include page="/public/public.jsp"/>
</head>
<body>
<jsp:include page="/public/head.jsp"/>  
    <div class="wrapper clearfix">
    <jsp:include page="/public/left.jsp"/>  
	<div class="main">
<s:form name="usr" action="resourceSaveAction!save.action" namespace="/resource">
<table class="advert-tab" cellspacing="0">
<tr class="advert-th">
		<th colspan="6" style="text-align:left;">资源管理&lt;&lt;权限信息列表</th>
	</tr>
	<!-- 
	<tr>
		<td colspan=6 style="text-align:right;">
			<input type="submit"  class="add-advert" value="查询"/>&nbsp;
			<input type="button" class="add-advert" onclick="showPnl('block');" value="添加"/>&nbsp;
			<input type="button" class="add-advert" value="删除"/>
			<input type="hidden" value="" name="resId" id="resId"/>
		</td>		
	</tr>
	 -->
	<tr style="display:block;" id="modifyPanel">
		<td colspan=6 style="text-align:left;">
			 权限名称：<input type="text" name="actionName" value=""/>
			 权限描述：<input type="text" name="actionDesc" value=""/>
			 权限标识：<input type="text" name="actionUUID" value=""/> 
					  <input type="hidden" value="" name="actionId" id="actionId"/>
					  <input type="button"  class="add-advert" value="查询"/>
						<input type="button" onclick="location.href='/OpenAuthWebApplication/action/actInitAction!init.action?oper=save'" value="添加"/>
		</td>		
	</tr>
</table>
<table class="advert-tab" cellspacing="0">
	<s:if test="#request.actlist.size==0">
	<tr>
		<td colspan="6">
			没有需要显示的数据！
		</td>
	</tr>
	</s:if>
	<s:else>
	<tr class="advert-th">
		<th>&nbsp;</th>
		<th>操作</th>
		<th>操作</th>
		<th>权限名称</th>
		<th>权限描述</th>
		<th>唯一标识</th>
	</tr>
	<s:iterator  value="#request.actionPageBean.data" id="action" status="resourceactlist">
	<tr>
		<td><input type="checkbox" name="actionIds" id="chk_<s:property value="#action.actionId" />" value="<s:property value="#action.actionId" />"/></td>
		<td><a href="javascript:updateSingle('<s:property value="#action.actionId" />')">修改</a></td>
		<td><a href="javascript:deleteSingle('chk_<s:property value="#action.actionId" />')">删除</a></td>
		<td><s:property value="#action.actionName" />&nbsp;</td>
		<td><s:property value="#action.actionDesc" />&nbsp;</td>
		<td><s:property value="#action.uuid" />&nbsp;</td>
	</tr>
	</s:iterator>
	</s:else>
</table>

<table class="advert-tab" cellspacing="0">
<tr>
	<td>
		<input type="hidden" name="currentPageNo" value="${currentPageNo}"/>
		<input type="hidden" name="prevPageNo" value="${prevPageNo}"/>
		<input type="hidden" name="nextPageNo" value="${nextPageNo}"/>
		<input type="hidden" name="totalCount" value="${totalCount}"/>
	</td>
	<td colspan=3>
		<input type="button" onclick="location.href='/OpenAuthWebApplication/action/userActionAction!getFirstPage.action'" value="首 页"/>&nbsp;
	</td>
	<td colspan=3>
		<input type="button" onclick="location.href='/OpenAuthWebApplication/action/userActionAction!getPrevPage.action'" value="上一页"/>&nbsp;
	</td>
	<td colspan=3>
		<input type="button" onclick="location.href='/OpenAuthWebApplication/action/userActionAction!getNextPage.action'" value="下一页"/>&nbsp;
	</td>
	<td colspan=3>
		<input type="button" onclick="location.href='/OpenAuthWebApplication/action/userActionAction!getLastPage.action'" value="末 页"/>&nbsp;
	</td>
</tr>
</table>

</s:form>
</div>
</div>
<%@ include file="/public/footer.jsp"%>
</body>
</html>